<template>
	<view class="paper-menu">
		<view class="paper-left-popup-mask" v-show="isShowMenu" @tap="hidePopup"></view>
		<view class="paper-left-popup" v-show="isShowMenu">
			<view class="add d-flex jc-center ai-center" hover-class="hover" @tap="addfriend">
				<view class="iconfont icon-sousuo"></view>加糗友
			</view>
			<view class="clear d-flex jc-center ai-center" hover-class="hover" @tap="clear">
				<view class="iconfont icon-qingchu"></view>清除缓存
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			isShowMenu: {
				type: Boolean,
				required: true
			}
		},
		methods: {
			addfriend() {
				this.$emit('addfriend')
			},
			clear() {
				this.$emit('clear')
			},
			hidePopup() {
				this.$emit('hidePopup')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.paper-menu {
		.paper-left-popup-mask {
			position: fixed;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 3;
		}

		.paper-left-popup {
			position: fixed;
			right: 0;
			top: 100upx;
			background-color: #FFFFFF;
			z-index: 9;
			width: 33%;
			box-shadow: 1upx 1upx 5upx 2upx #CCCCCC;

			.add {
				color: #111111;
				padding: 6upx 0;
			}

			.clear {
				color: #111111;
				padding: 6upx 0;
			}

			.iconfont {
				font-weight: bold;
				margin-right: 10upx;
			}

			.hover {
				background-color: #EEEEEE
			}
		}
	}
</style>
